// 调用封装好的调用接口函数
import {get, post } from '../util/request';



//1.注册(修改密码)
export const reqReg = (phone, pasd, code, nickname) => get(`/register/cellphone?phone=${phone}&password=${pasd}&captcha=${code}&nickname=${nickname}`);
// 必选参数:captcha: 验证码 phone: 手机号码   password: 密码   nickname: 昵称

// 2.检测手机号码是否已注册
export const reqRegRepeat = (phone) => get(`/cellphone/existence/check?phone=${phone}`);
// 必选参数 :phone: 手机号码


//3. 初始化昵称
export const reqInitNickname = (nickname) => get(`/activate/init/profile?nickname=${nickname}`);
//必选参数 : nickname : 昵称


//3. 重复昵称检测
export const reqRepeatNickname = (nickname) => get(`/nickname/check?nickname=${nickname}`);
//必选参数 : nickname : 昵称

// 4.更换绑定手机
export const reqChangePhone = (phone, oldcaptcha, captcha) => get(`/rebind?phone=${phone}&oldcaptcha=${oldcaptcha}&captcha=5678${captcha}`);
// 必选参数: oldcaptcha: 原手机验证码
// captcha: 新手机验证码
// phone: 手机号码